<template>
  <span>
      {{index + 1}}:<span :class="res[arr[index]].class">{{res[arr[index]].msg}}</span>
  </span>
</template>

<script>
export default {
  props: ['arr', 'index'],
  data () {
    return {
      res: [{
        msg: '未完成',
        class: 'undo'
      }, {
        msg: '正确',
        class: 'right'
      }, {
        msg: '错误',
        class: 'error'
      }]
    }
  }
}
</script>

<style scoped>
.right {
  color: green;
}
.error {
  color: red;
}
.undo {
  color: #ccc;
}
</style>
